-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[libclang/python] Add isFunctionInlined support #162882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
|
@llvm/pr-subscribers-clang Author: Thomas Applencourt (TApplencourt) Changes
I was not able to figure out why Regards, Full diff: https://github.com/llvm/llvm-project/pull/162882.diff 1 Files Affected:
diff --git a/clang/bindings/python/clang/cindex.py b/clang/bindings/python/clang/cindex.py
index 80140d2787608..015667b4decd9 100644
--- a/clang/bindings/python/clang/cindex.py
+++ b/clang/bindings/python/clang/cindex.py
@@ -2362,6 +2362,13 @@ def get_bitfield_width(self) -> int:
"""
return conf.lib.clang_getFieldDeclBitWidth(self) # type: ignore [no-any-return]
+ def is_function_inlined(self) -> bool:
+ """
+ Check if the function is inlined
+ """
+ assert self.kind == TypeKind.FUNCTIONPROTO
+ return bool(conf.lib.clang_Cursor_isFunctionInlined(self)) # type: ignore [no-any-return]
+
@cursor_null_guard
def has_attrs(self) -> bool:
"""
@@ -4308,6 +4315,7 @@ def set_property(self, property, value):
("clang_Cursor_isAnonymous", [Cursor], bool),
("clang_Cursor_isAnonymousRecordDecl", [Cursor], bool),
("clang_Cursor_isBitField", [Cursor], bool),
+ ("clang_Cursor_isFunctionInlined", [Cursor], c_uint),
("clang_Location_isInSystemHeader", [SourceLocation], bool),
("clang_PrintingPolicy_dispose", [PrintingPolicy]),
("clang_PrintingPolicy_getProperty", [PrintingPolicy, c_int], c_uint),
|
|
Pinging @DeinAlptraum (or at least the git blame seem to imply that you are the one in charge :) sorry if it's not the case) |
1300ae3 to
7a69e7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi and thanks for the PR! Yes, I am the right person to ping for the libclang-python bindings.
Please also
- Add a release note (
clang/docs/ReleaseNotes.rst) - Add test(s) for the new function
|
Release note added in 6edd33c |
|
LGTM. @Endilll do you also want to take a look at this? |
Co-authored-by: Vlad Serebrennikov <[email protected]>
Co-authored-by: Vlad Serebrennikov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be merged after you update the PR description, because it goes into the commit message.
|
Thanks! Edited. |
|
@TApplencourt Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/141/builds/12643 Here is the relevant piece of the build log for the reference |
`cindex.py` was missing support for [isFunctionInlined](https://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#ga963097b9aecabf5dce7554dff18b061d), this PR add it. --------- Co-authored-by: Vlad Serebrennikov <[email protected]>
`cindex.py` was missing support for [isFunctionInlined](https://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#ga963097b9aecabf5dce7554dff18b061d), this PR add it. --------- Co-authored-by: Vlad Serebrennikov <[email protected]>
cindex.pywas missing support for isFunctionInlined, this PR add it.